#ifndef TEACHPAGE_H
#define TEACHPAGE_H

#include <QWidget>

class Widget;   //声明父窗口类

namespace Ui {
class TeachPage;
}

class TeachPage : public QWidget
{
    Q_OBJECT

public:
    //菜单界面按钮id
    enum MenuWidget{
        MainMenu_id=0,
        BasicCmd_id,
        AxisCtlCmd_id,
    };

    //菜单界面按钮id
    enum ProgWidget{
        Prog_id=0,
        Input_id,
        Output_id,
    };

    //编程界面编辑对话框ID
    enum DialogSwitch{
        MainProg_id=0,
        SubProg_id,
        AxisMove_id,
        IncMotion_id,
        StackPos_id,
        StackCnt_id,
        UserVar_id,
        PulseWidthOutput_id,
        JudgeCond_id,
        LoopCond_id,
        Jump_id,
        Delay_id,
        Otherwise_id,
        SpecialCmd_id,
        OutputDetect_id,
        SearchMotion_id,
        MachBack0_id,
        CoordRst_id,
        SlowDownPoint_id,
        InterpolationStart_id,
        AdvConfirm_id,
        LineInterpolation_id,
        TransPoint_id,
        OutputCtl_id,
        InputDetect_id,
    };

    bool bPush0;        //基本指令按钮按下标志；
    bool bPush1;        //轴控指令按钮按下标志；

public:
    explicit TeachPage(QWidget *parent = nullptr);
    ~TeachPage();

    void init();

private slots:
    void on_Btn_basicCmd_clicked();

    void on_Btn_axisCtlCmd_clicked();

private:
    Ui::TeachPage *ui;

    Widget *pWidget;    //创建父类窗口指针
};

#endif // TEACHPAGE_H
